package org.dxy.domain.event.process;

import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * @description: 工序分配事件
 * 只包含业务必需字段
 * @author: dxy
 * @createTime: 2025/6/22 23:47
 */
public record ProcessAssignedEvent(
        /**
         * 工序ID
         */
        Long processId,
        
        /**
         * 工位ID
         */
        Long workstationId,
        
        /**
         * 设备ID
         */
        Long equipmentId
) implements DomainEvent {
    
    @Override
    public Long aggregateId() {
        return processId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.PROCESS.getKey();
    }
    
    @Override
    public String eventType() {
        return ProcessEventTypeEnum.ASSIGNED.getKey();
    }
} 